Next | Prev | Up | Top | Contents | Index

How to Check for OpenGL Extension Availability

All supported extensions have a corresponding definition in gl.h and a token in the extensions string returned by glGetString(). For example, if the ABGR extension (EXT_abgr) is supported, it is defined in gl.h as follows:

#define GL_EXT_abgr 1
GL_EXT_abgr appears in the extensions string returned by glGetString(). Use the definitions in gl.h at compile time to determine if procedure calls corresponding to an extension exist in the library.

Applications should do compile-time checking--for example, making sure GL_EXT_abgr is defined; and run-time checking--for example, making sure GL_EXT_abgr is in the extension string returned by glGetString().


Next | Prev | Up | Top | Contents | Index